lass Company
  include Mongoid::Document
  field :name, type: String
  embeds_one :address, as: :locatable 
  has_many :phones, dependent: :delete ## on delete of company delete corresponding posts
end